//
//  PKRadioMainViewCell.m
//  PianKe
//
//  Created by mingtao on 15/10/4.
//  Copyright (c) 2015年 mingtao. All rights reserved.
//

#import "PKRadioMainViewCell.h"

#import <UIImageView+WebCache.h>

@implementation PKRadioMainViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _Imagecoverimg = [[UIImageView alloc]init];
        
        _Imagecoverimg.frame = CGRectMake(5, 5,100, 100);
        
        [self.contentView addSubview:_Imagecoverimg];
        
        _labletitle=[[UILabel alloc]initWithFrame:CGRectMake(110, 5, 150, 30)];
         // [lb setFont:[UIFontsystemFontOfSize:13]];
        
        [_labletitle setFont:[UIFont systemFontOfSize:18]];
        
        [self.contentView addSubview:_labletitle];
        
        _imagecount = [[UIImageView alloc]init];
        _imagecount.frame = CGRectMake(260, 5, 20, 20);
        
        _imagecount.image = [UIImage imageNamed:@"imagesy"];
        
        [self.contentView addSubview:_imagecount];
        
        _lableCount=[[UILabel alloc]initWithFrame:CGRectMake(290, 5, 85, 30)];
        
        
        [self.contentView addSubview:_lableCount];
        
        _laleuname=[[UILabel alloc]initWithFrame:CGRectMake(110, 40, 200, 30)];
        
        [self.contentView addSubview:_laleuname];
        
        
        _labledesc=[[UILabel alloc]initWithFrame:CGRectMake(110, 75, 260, 30)];
        
        [self.contentView addSubview:_labledesc];
        
    }
    
    return self;

}

-(void)setRadiomain:(PKRadioMainModel *)Radiomain
{
    _Radiomain=Radiomain;
    
    [_Imagecoverimg sd_setImageWithURL:[NSURL URLWithString:Radiomain.coverimg]];
    
    _labletitle.text=Radiomain.title;
    _lableCount.text=[NSString stringWithFormat:@"%ld",Radiomain.count];
    
    _laleuname.text = [@"by:" stringByAppendingString:Radiomain.userinfo[@"uname"]];
    
    _labledesc.text = Radiomain.desc;
    

}





















- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
